package com.demo.xml_d_spel;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestCycle {
    //spring工厂
    @Test
    public void test2(){
        String xmlPath="com/demo/xml_d_spel/beans.xml";
        ApplicationContext classPathXmlApplicationContext=new ClassPathXmlApplicationContext(xmlPath);
        Customer Customer = (Customer) classPathXmlApplicationContext.getBean("customerId");
        System.out.println(Customer);
    }
}
